﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Process">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="ProcessID" type="xs:unsignedByte" />
        <xs:element name="ProcessCode" type="xs:string" />
        <xs:element name="Activities">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="Activity">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="ActivityID" type="xs:unsignedByte" />
                    <xs:element name="ActivityCode" type="xs:string" />
                    <xs:element name="ActivityType" type="xs:unsignedByte" />
                    <xs:element minOccurs="0" name="Participants">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="Roles">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="Role" type="xs:string" />
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="name" type="xs:string" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Transitions">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="Transition">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="FromActivity" type="xs:unsignedByte" />
                    <xs:element name="ToActivity" type="xs:unsignedByte" />
                    <xs:element minOccurs="0" name="Conditions">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="Rule" type="xs:string" />
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="name" type="xs:string" use="required" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="name" type="xs:string" use="required" />
    </xs:complexType>
  </xs:element>
</xs:schema>